]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Don't reset adjustment on ::pages-changed
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 23 Feb 2021 22:39:29 +0000 (23:39 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Mar 2021 22:02:56 +0000 (22:02 +0000)
Let the goToPage call afterwards to take precedence, instead
of resetting the adjustment (thus the view) on the side.

This resulted in strange state when the last page contains
a single icon, and it is dragged. The last page being emptied
triggers a pages-changed signal, which half resets the view
to the first page while DnD is ongoing.

Letting goToPage do its business means we neatly clamp to the
closest page to currentPage, the last page in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1630>

js/ui/appDisplay.js

index 94d1ef24e0702c4ba6af2cb30f73f1a2d32ef621..0c2b9759873463bfe42173a00201cde816aa4d2c 100644 (file)
@@ -143,7 +143,6 @@ var BaseAppView = GObject.registerClass({
         // Standard hack for ClutterBinLayout
         this._grid.x_expand = true;
         this._grid.connect('pages-changed', () => {
-            this._adjustment.value = 0;
             this.goToPage(this._grid.currentPage);
             this._pageIndicators.setNPages(this._grid.nPages);
             this._pageIndicators.setCurrentPosition(this._grid.currentPage);